<?php
/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * @Date: 2021-12-21 17:40:54
 * @LastEditors: Sam
 * @LastEditTime: 2022-03-07 16:29:29
 */
// +----------------------------------------------------------------------
// | 应用设置
// +----------------------------------------------------------------------
use think\facade\Env;
defined('SYSTEM') OR define('SYSTEM', Env::get('SYSTEM'));
return [
    // 应用地址
    'app_host'         => Env::get('app.host', ''),
    // 应用的命名空间
    'app_namespace'    => '',
    // 是否启用路由
    'with_route'       => true,
    // 默认应用
    'default_app'      => 'index',
    // 默认时区
    'default_timezone' => 'Asia/Shanghai',
    // 自动多应用模式
    'auto_multi_app'   => true,
    // 应用映射（自动多应用模式有效）
    'app_map'          => [],
    // 域名绑定（自动多应用模式有效）
    'domain_bind'      => [],
    // 禁止URL访问的应用列表（自动多应用模式有效）
    'deny_app_list'    => [],

    // 异常页面的模板文件
    'exception_tmpl'   => app()->getThinkPath() . 'tpl/think_exception.tpl',

    // 错误显示信息,非调试模式有效
    'error_message'    => '页面错误！请稍后再试～',
    // 显示错误信息
    'show_error_msg'   => false,
      // 默认AJAX 数据返回格式,可选json xml ...
      'default_ajax_return'    => 'json',
        // OSS配置
    'oss'  => [
        'bucket_name'        => app()->env->get('oss_bucket'),
        'access_key_id'      => app()->env->get('oss_key_id'),
        'access_key_secret'  => app()->env->get('oss_key_secret'),
        'static_url'         => app()->env->get('oss_static_url'),
        'upload_url'         => app()->env->get('oss_upload_url'),
        'static_path'        => app()->env->get('oss_static_path'),
    ],

    // COS配置
    'cos'  => [
        'bucket_name'   => app()->env->get('cos_bucket'),
        'secret_id'     => app()->env->get('cos_secret_id'),
        'secret_key'    => app()->env->get('cos_secret_key'),
        'region'        => app()->env->get('cos_region'),
        'static_url'    => app()->env->get('cos_static_url'),
        'static_path'   => app()->env->get('cos_static_path'),
    ],

    // AWS配置
    'aws'  => [
        'bucket_name'        => app()->env->get('aws_bucket'),
        'access_key_id'      => app()->env->get('aws_key_id'),
        'access_key_secret'  => app()->env->get('aws_key_secret'),
        'region'             => app()->env->get('aws_region'),
        'static_url'         => app()->env->get('aws_static_url'),
        'static_path'        => app()->env->get('aws_static_path')
    ],

    // 七牛配置
    'qiniu'  => [
        'bucket_name'        => app()->env->get('qiniu_bucket'),
        'access_key_id'      => app()->env->get('qiniu_key_id'),
        'access_key_secret'  => app()->env->get('qiniu_key_secret'),
        'region'             => app()->env->get('qiniu_region'),
        'static_url'         => app()->env->get('qiniu_static_url'),
        'static_path'        => app()->env->get('qiniu_static_path')
    ],

    // LOCAL配置
    'local'  => [
        'static_url'         => app()->env->get('local_static_url'),
        'static_path'        => app()->env->get('local_static_path')
    ],

    // redis配置
    'redis' => [
        'redis_host'  => app()->env->get(SYSTEM.'.redis_host'),
        'redis_port'  => app()->env->get(SYSTEM.'.redis_port'),
        'redis_pass'  => app()->env->get(SYSTEM.'.redis_pass'),
        'redis_index' => app()->env->get(SYSTEM.'.redis_index'),
    ]
];
